<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024/11/16
  Time: 14:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>测试</title>
</head>
<body>

hello <%= request.getAttribute("myname")%>

<h1 style="text-align: center">表单验证</h1>
<div style="display: flex; width: 500px; gap: 10px; margin: auto;">
    <form action="reg" method="post" enctype="multipart/form-data"
          style="display: grid; grid-template-columns: 100px 200px; gap: 10px;
                 width: 330px; margin: auto; padding: 10px; border: 1px solid #777">
        账号: <input name="name">
        年龄: <input name="age">
        性别: <input name="gender">
        邮箱: <input name="email">
        生日: <input name="birthday" type="date">
        头像: <input name="head" type="file">
        <button style="grid-column: 2">注册</button>
        <button style="grid-column: 2" formaction="upload">上传头像</button>
    </form>
    <img src="https://img0.baidu.com/it/u=1721572911,3228501054&fm=253&fmt=auto&app=138&f=JPEG?w=380&h=380"
         alt="" style="flex: auto; border: 1px solid #999; height: 200px">
</div>

<%
    System.out.println("---------------test.jsp----------------");
%>

</body>
</html>
